<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>GENLIB_MACRO</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE=" GenLib User's Manual "
HREF="genlib.html"><LINK
REL="UP"
TITLE="Alliance - genlib User's Manual "
HREF="ref_genlib.html"><LINK
REL="PREVIOUS"
TITLE="genlib"
HREF="man_genlib.html"><LINK
REL="NEXT"
TITLE="DPGEN_INV"
HREF="man_dpgen_inv.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GenLib User's Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="man_genlib.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="man_dpgen_inv.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="GENLIB-MACRO"
></A
>GENLIB_MACRO</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN470"
></A
><H2
>Name</H2
> GENLIB_MACRO &nbsp;--&nbsp; Interface with all MACRO generators. </DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN473"
></A
><H2
>Synopsis</H2
><DIV
CLASS="FUNCSYNOPSIS"
><P
></P
><A
NAME="AEN474"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="FUNCSYNOPSISINFO"
>#include  &#60;genlib.h&#62;</PRE
></TD
></TR
></TABLE
><P
><CODE
><CODE
CLASS="FUNCDEF"
>void <TT
CLASS="FUNCTION"
>GENLIB_MACRO</TT
></CODE
>(long <TT
CLASS="PARAMETER"
><I
>function</I
></TT
>, char *<TT
CLASS="PARAMETER"
><I
>modelname</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>flags</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>N</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>drive</I
></TT
>, long <TT
CLASS="PARAMETER"
><I
>regNumber</I
></TT
>, char *<TT
CLASS="PARAMETER"
><I
>constVal</I
></TT
>);</CODE
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN493"
></A
><H2
> Description </H2
><P
> The <I
CLASS="EMPHASIS"
>GENLIB_MACRO()</I
> fonction call is the generic interface to
    all <I
CLASS="EMPHASIS"
>genlib</I
> macro generators. As all generators do not have the
    sames arguments it takes a variable number of arguments.
    </P
><P
> Arguments are of two kinds :
    <P
></P
><UL
><LI
><P
> Mandatory arguments : those arguments must always be
        supplied. They represents the minimal set of common arguments for
        all macro-generators. Mandatory arguments comme firts in the
        arguments list.
        </P
></LI
><LI
><P
> Optional arguments : arguments specifics to a
        macro-generator or a class of macro-generators.
        </P
></LI
></UL
>
    </P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN504"
></A
><H3
> Arguments </H3
><P
></P
><OL
TYPE="1"
><LI
><P
><TT
CLASS="LITERAL"
>long  <VAR
CLASS="REPLACEABLE"
>function</VAR
></TT
> : (mandatory) specify which macro-generator
          is to be invoked. For example, to create a two entry multiplexer
          gives <TT
CLASS="LITERAL"
>GENLIB_MUX2</TT
>.
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>char* <VAR
CLASS="REPLACEABLE"
>modelname</VAR
></TT
> : (mandatory) specify the name of the model
          to be generated. For example :
          <TT
CLASS="LITERAL"
>"model_mux2_32bits"</TT
>.
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>long  <VAR
CLASS="REPLACEABLE"
>flags</VAR
></TT
> : (mandatory) tells which views are to be
          generated. It is a logical combination of the following values :
          (<I
CLASS="EMPHASIS"
>ORed</I
>)
          <P
></P
><OL
TYPE="a"
><LI
><P
><TT
CLASS="LITERAL"
>F_PLACE</TT
> : generate physical view (placement only).
              </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>F_BEHAV</TT
> : generate behavioral view (<I
CLASS="EMPHASIS"
>VHDL</I
> view).
              </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>F_LSB_FIRST</TT
> : the terminal of index zero is matched
              to the <ACRONYM
CLASS="ACRONYM"
>LSB</ACRONYM
>, thus a 32 bits vector will be written :
              <TT
CLASS="LITERAL"
>"signal[31:0]"</TT
>.
              </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>F_MSB_FIRST</TT
> : the terminal of index zero is matched
              to the <ACRONYM
CLASS="ACRONYM"
>MSB</ACRONYM
>, thus a 32 bits vector will be written :
              <TT
CLASS="LITERAL"
>"signal[0:31]"</TT
> (aka. <ACRONYM
CLASS="ACRONYM"
>IBM</ACRONYM
> notation).
              </P
></LI
></OL
>
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>long  <VAR
CLASS="REPLACEABLE"
>N</VAR
></TT
> : (mandatory) width of the model's bus to be
          generated.
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>long  <VAR
CLASS="REPLACEABLE"
>drive</VAR
></TT
> : (optional) output power drive.
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>long  <VAR
CLASS="REPLACEABLE"
>regNumber</VAR
></TT
> : (optional) number of registers or depth
          of for a <ACRONYM
CLASS="ACRONYM"
>FIFO</ACRONYM
> macro-generator.
          </P
></LI
><LI
><P
><TT
CLASS="LITERAL"
>char* <VAR
CLASS="REPLACEABLE"
>constval</VAR
></TT
> : (optional) a character string holding a
          constant. For example : <TT
CLASS="LITERAL"
>"0xFFFF0000"</TT
>.
          </P
></LI
></OL
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN559"
></A
><H3
> Available Macro-Generators </H3
><P
>      <P
></P
><UL
><LI
><P
> Inverters and Buffers :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_inv.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_INV</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_buff.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_BUFF</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Boolean Operators :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_nand2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NAND2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nand3.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NAND3</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nand4.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NAND4</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_and2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_AND2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_and3.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_AND3</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_and4.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_AND4</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nor2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NOR2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nor3.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NOR3</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nor4.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NOR4</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_or2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_OR2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_or3.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_OR3</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_or4.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_OR4</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_xor2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_XOR2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_xnor2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_XNOR2</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Multiplexers and Tristates :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_nmux2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NMUX2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_mux2.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_MUX2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nbuse.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NBUSE</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_buse.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_BUSE</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Programmable Masks :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_nand2mask.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NAND2MASK</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nor2mask.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NOR2MASK</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_xnor2mask.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_XNOR2MASK</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Arithmetics Operators :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_adsb2f.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_ADSB2F</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_shift.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_SHIFT</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Miscellaneous :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_nul.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_NUL</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nul.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_CONST</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nul.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_ROM2</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_nul.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_ROM4</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
><LI
><P
> Registers :
          <P
></P
><UL
><LI
><P
><A
HREF="man_dpgen_rf1.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_RF1</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_rf1.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_RF1R0</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_fifo.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_FIFO</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_rf1d.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_RF1D</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_rf1d.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_RF1DR0</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_dff.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_DFF</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_dfft.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_DFFT</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_sff.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_SFF</SPAN
>(3)</SPAN
></A
></P
></LI
><LI
><P
><A
HREF="man_dpgen_sfft.html"
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>DPGEN_SFFT</SPAN
>(3)</SPAN
></A
></P
></LI
></UL
>
          </P
></LI
></UL
>
      </P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN812"
></A
><H2
>See Also</H2
><P
>      <SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>mbk</SPAN
>(1)</SPAN
>,
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="man_genlib.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="genlib.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="man_dpgen_inv.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>genlib</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref_genlib.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>DPGEN_INV</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>